package com.jiashihui.schema_lgorithm.schema.builder;

import java.util.ArrayList;
import java.util.List;

/**
 * @author jiashihui
 * @describe: Spacex构造器
 * @date 2019/02/25
 */
public class SpacexBuilder {
    /* 产品介绍列表 */
    private List<ProductIntroduction> productIntroList = new ArrayList<ProductIntroduction>();

    public List<ProductIntroduction> getProductIntroductionList() {
        return productIntroList;
    }

    /**
     * 生产Dragon
     *
     * @author Kevin
     */
    public void produceDragon(int count) {
        for (int i = 0; i < count; i++) {
            productIntroList.add(new DragonImpl());
        }
    }

    /**
     * 生产Kestrel
     *
     * @author Kevin
     */
    public void produceKestrel(int count) {
        for (int i = 0; i < count; i++) {
            productIntroList.add(new KestrelImpl());
        }
    }

    /**
     * 生产Merlin
     *
     * @author Kevin
     */
    public void produceMerlin(int count) {
        for (int i = 0; i < count; i++) {
            productIntroList.add(new MerlinImpl());
        }
    }
}
